import { SBuffer } from "../../../../Message/Public/SBuffer";
import { TState } from "../../../../Message/Db/Tables/TState";
import { SkillStateConfig } from "../../resource/SkillStateConfig";
type int = number;
//class BuffInfo
    
    export  class BuffInfo
    {
        constructor(arg1: SBuffer=null)
        {
            
            this.sbuff = arg1;
            return;
        }

        public get sbuff(): SBuffer
        {
            return this._sbuff;
        }

        public set sbuff(arg1: SBuffer)
        {
            this._sbuff = arg1;
            return;
        }

        public get tstate(): TState
        {
            if (this._sbuff) 
            {
                this._tstate = SkillStateConfig.instance.getInfoByName(this._sbuff.code);
            }
            return this._tstate;
        }

        public set tstate(arg1: TState)
        {
            this._tstate = arg1;
            return;
        }

        public getIconPath(): string
        {
            var loc1=this.tstate;
            if (loc1 && !(loc1.icon == "")) 
            {
                return loc1.icon + ".jpg";
            }
            return "";
        }

        public getLeavSeconds(): number
        {
            var loc1=0;
            if (this._sbuff) 
            {
                loc1 = this._sbuff.remainSec;
            }
            return loc1;
        }

        public setLeavSeconds(arg1: int): void
        {
            if (this._sbuff) 
            {
                this._sbuff.remainSec = arg1;
            }
            return;
        }

        public get stateId(): int
        {
            if (this._sbuff) 
            {
                this._stateId = this._sbuff.code;
            }
            return this._stateId;
        }

        public get group(): int
        {
            if (this._tstate) 
            {
                this._group = this._tstate.group;
            }
            return this._group;
        }

        public set group(arg1: int)
        {
            this._group = arg1;
            return;
        }

        /* internal */ /* var */_sbuff: SBuffer;

        /* internal */ /* var */_tstate: TState;

        /* internal */ /* var */_stateId: int;

        /* internal */ /* var */_group: int;
    }
